package com.tude._07vehicle.pojo.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserRegParam {
    @NotNull(message = "用户名不能为null")
    @Pattern(regexp = "^([a-zA-Z]{0,14}|[\u4e00-\u9fa5]{0,7})$", message = "用户名最长14个英文或7个汉字")
    private String username;
    @Size(min = 6, message = "密码长度不能小于6位")
    private String password;
    @Email(message = "邮箱格式不正确")
    private String email;
    private String phone;
}
